import Vue from 'vue'
import VueRouter from 'vue-router'
import routers from './routers'

Vue.use(VueRouter);

const routes = [
    ...routers,
];

const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
});

router.beforeEach((to, from, next) => {
    //已登录，直接跳转
    next();
});

router.afterEach((to, from, next) => {

});

export default router
